package com.hykj.coca.result;



public class AppBack<T> {


    private int status;
    private T result;
    private String msg;
    private String action;

    public AppBack(int status, String msg){
        this.status=status;
        this.msg=msg;
        result=null;
    }

    public AppBack(boolean isOk) {
        if (isOk) {
            result=null;
            status=0;
            msg="成功";
            return;
        } else {
            this.status=-10;
            this.msg="操作失败";
            result=null;
            return ;
        }
    }

    public AppBack(T data){
        result=data;
        status=0;
        msg="";
    }

    public AppBack(){
        result=null;
        status=0;
        msg="成功";
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public T getResult() {
        return result;
    }

    public void setResult(T result) {
        this.result = result;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getAction() {
        return action;
    }

    public void setAction(String action) {
        this.action = action;
    }
}
